package com.diapoclic.entitybean;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Date;
import java.util.Set;

public class Document implements Serializable {
	        private static final long serialVersionUID = 1L;

	        private int idDoc;
	        private String comment;
	        private Date dateAdd=new Date();
	        private String nameDoc;
	        private String path;
	        private int size;
	        private String type;
	        private User user=new User();

	       
//	        private Set<Folder> folders;

	        public Document() {
	        }
	        
	        public int getIdDoc() {
	                return this.idDoc;
	        }

	        public void setIdDoc(int idDoc) {
	                this.idDoc = idDoc;
	        }

	        public String getComment() {
	                return this.comment;
	        }

	        public void setComment(String comment) {
	                this.comment = comment;
	        }

	        public Date getDateAdd() {
	                return this.dateAdd;
	        }

	        public void setDateAdd(Date dateAdd) {
	                this.dateAdd = dateAdd;
	        }

	        public String getNameDoc() {
	                return this.nameDoc;
	        }

	        public void setNameDoc(String nameDoc) {
	                this.nameDoc = nameDoc;
	        }

	        public String getPath() {
	                return this.path;
	        }

	        public void setPath(String path) {
	                this.path = path;
	        }

	        public int getSize() {
	                return this.size;
	        }

	        public void setSize(int size) {
	                this.size = size;
	        }

	        public String getType() {
	                return this.type;
	        }

	        public void setType(String type) {
	                this.type = type;
	        }

	        public User getUser() {
	                return this.user;
	        }

	        public void setUser(User user) {
	                this.user = user;
	        }
	        
	        public String toString()
	        {
	        	String S=new String();
	        	S="<br/> id : " +this.idDoc +" <br/> Name : " +this.nameDoc+ "<br/> Comment : " + this.comment;
	        	S+="<br/>Path : " + this.path+"<br/> Size : " +this.size + "<br/>  Type : " + this.type;
	        	S+="<br/> id User : " + this.getUser().getIdUser()+"<br/> Date d'ajout : "+ this.getDateAdd().toString()+"\n";
	    		return S ;
	        	
	        }
	        
	  /*      public Set<Folder> getFolders() {
	                return this.folders;
	        }

	        public void setFolders(Set<Folder> folders) {
	                this.folders = folders;
	        }
	    */
	        
	}


